﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace WPF_Study
{
    public class CustomTextBox : TextBox
    {
        public static readonly DependencyProperty TextBoxCornerRadiusProperty = DependencyProperty.Register(
            nameof(TextBoxCornerRadius), typeof(CornerRadius), typeof(CustomTextBox));
        // ,new PropertyMetadata(default(CornerRadius))

        public CornerRadius TextBoxCornerRadius
        {
            get { return (CornerRadius)GetValue(TextBoxCornerRadiusProperty); }
            set { SetValue(TextBoxCornerRadiusProperty, value); }
        }

        public static readonly DependencyProperty BackgroundFocusedProperty = DependencyProperty.Register(
            nameof(BackgroundFocused), typeof(Brush), typeof(CustomTextBox));
        // , new PropertyMetadata(default(Brush))        

        public Brush BackgroundFocused
        {
            get { return (Brush)GetValue(BackgroundFocusedProperty); }
            set { SetValue(BackgroundFocusedProperty, value); }
        }
    }
}